#ifndef STATESYNCCMD_H
#define STATESYNCCMD_H

#include "Command/BaseCmd.h"
#include "Protocol/CloudProtocol.h"

class StateSyncCmd : public BaseCmd
{
    Q_OBJECT
public:
    enum{FunctionCode = CloudProtocol::StateSync};

    Q_INVOKABLE explicit StateSyncCmd(QObject *parent = 0);

    Package toPackage();
    void unPackage(Package package);

    quint32 totalRamSize() const;
    void setTotalRamSize(const quint32 &totalRamSize);

    quint32 usedRamSize() const;
    void setUsedRamSize(const quint32 &usedRamSize);

    quint64 totalFlashSize() const;
    void setTotalFlashSize(const quint64 &totalFlashSize);

    quint64 usedFlashSize() const;
    void setUsedFlashSize(const quint64 &usedFlashSize);

    QString runningTime() const;
    void setRunningTime(const QString &runningTime);

    QString ip() const;
    void setIp(const QString &ip);

    quint8 state() const;
    void setState(const quint8 &state);

    QString appVersion() const;
    void setAppVersion(const QString &appVersion);

private:
    quint8  m_state;
    quint32 m_totalRamSize;
    quint32 m_usedRamSize;
    quint64 m_totalFlashSize;
    quint64 m_usedFlashSize;
    QString m_runningTime;
    QString m_ip;
    QString m_appVersion;
};

#endif // STATESYNCCMD_H
